import { ApiProperty } from '@nestjs/swagger';
import { IsNumber, IsOptional, IsString } from 'class-validator';
import { Transform } from 'class-transformer';

export class ImageDto {
  @ApiProperty({ default: 0 })
  @IsNumber()
  @Transform(({ value }) => parseInt(value))
  width: number;
  @ApiProperty({ default: 0 })
  @IsNumber()
  @Transform(({ value }) => parseInt(value))
  height: number;
  @ApiProperty()
  @IsString()
  id: string;
}
